<?php

/**
 * Ftpgroup form base class.
 *
 * @package    form
 * @subpackage ftpgroup
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 8508 2008-04-17 17:39:15Z fabien $
 */
class BaseFtpgroupForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'        => new sfWidgetFormInputHidden(),
      'groupname' => new sfWidgetFormInput(),
      'gid'       => new sfWidgetFormInput(),
      'members'   => new sfWidgetFormInput(),
    ));

    $this->setValidators(array(
      'id'        => new sfValidatorDoctrineChoice(array('model' => 'Ftpgroup', 'column' => 'id', 'required' => false)),
      'groupname' => new sfValidatorString(array('max_length' => 16)),
      'gid'       => new sfValidatorInteger(),
      'members'   => new sfValidatorString(array('max_length' => 16)),
    ));

    $this->widgetSchema->setNameFormat('ftpgroup[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Ftpgroup';
  }

}
